<?php
/**
 *
 */
namespace app\home\controller\goods;

use app\home\controller\Base;

class Show extends Base
{

	public function index(){
        $params = $this->request->param();
        if(!$params){
            $params = ['page'=>1,'coin_id'=>'','cate_id'=>'','desc_name'=>''];
        }
        $whereFields = ['page','coin_id','cate_id','desc_name'];
        $whereData = [];
        foreach($whereFields as $field):
            if(isset($params[$field]))
                $whereData[$field] = $params[$field];
        endforeach;
		$pageData = ['title'=>'商品列表'];
		$this->assign('pageData',$pageData);
        $this->assign('whereData',$whereData);
		return view();
	}

    public function details(){
        $param = $this->request->param('id');
        $pageData = ['title'=>'商品详情'];
        $this->assign('pageData',$pageData);
        $this->assign('gid',$param);
        return view();
    }

}